#region License
// Copyright 2006 James Newton-King
// http://www.newtonsoft.com
//
// This work is licensed under the Creative Commons Attribution 2.5 License
// http://creativecommons.org/licenses/by/2.5/
//
// You are free:
//    * to copy, distribute, display, and perform the work
//    * to make derivative works
//    * to make commercial use of the work
//
// Under the following conditions:
//    * You must attribute the work in the manner specified by the author or licensor:
//          - If you find this component useful a link to http://www.newtonsoft.com would be appreciated.
//    * For any reuse or distribution, you must make clear to others the license terms of this work.
//    * Any of these conditions can be waived if you get permission from the copyright holder.
#endregion

using System;
using System.Collections.Generic;
using System.Text;

namespace CodePlex.Resourceful.Json
{
    internal enum JsonType
    {
        Object,
        Array,
        None
    }

    /// <summary>
    /// Specifies the state of the <see cref="JsonWriter"/>.
    /// </summary>
    public enum WriteState
    {
        /// <summary>
        /// An exception has been thrown, which has left the <see cref="JsonWriter"/> in an invalid state.
        /// You may call the <see cref="JsonWriter.Close"/> method to put the <see cref="JsonWriter"/> in the <c>Closed</c> state.
        /// Any other <see cref="JsonWriter"/> method calls results in an <see cref="InvalidOperationException"/> being thrown. 
        /// </summary>
        Error,
        /// <summary>
        /// The <see cref="JsonWriter.Close"/> method has been called. 
        /// </summary>
        Closed,
        /// <summary>
        /// An object is being written. 
        /// </summary>
        Object,
        /// <summary>
        /// A array is being written.
        /// </summary>
        Array,
        /// <summary>
        /// A property is being written.
        /// </summary>
        Property,
        /// <summary>
        /// A write method has not been called.
        /// </summary>
        Start
    }

    /// <summary>
    /// Specifies formatting options for the <see cref="JsonWriter"/>.
    /// </summary>
    public enum Formatting
    {
        /// <summary>
        /// No special formatting is applied. This is the default.
        /// </summary>
        None,
        /// <summary>
        /// Causes child objects to be indented according to the <see cref="JsonWriter.Indentation"/> and <see cref="JsonWriter.IndentChar"/> settings.
        /// </summary>
        Indented
    }







    /// <summary>
    /// Specifies the type of Json token.
    /// </summary>
    public enum JsonToken
    {
        /// <summary>
        /// This is returned by the <see cref="JsonReader"/> if a <see cref="JsonReader.Read"/> method has not been called. 
        /// </summary>
        None,
        /// <summary>
        /// An object start token.
        /// </summary>
        StartObject,
        /// <summary>
        /// An array start token.
        /// </summary>
        StartArray,
        /// <summary>
        /// An object property name.
        /// </summary>
        PropertyName,
        /// <summary>
        /// A comment.
        /// </summary>
        Comment,
        /// <summary>
        /// An interger.
        /// </summary>
        Integer,
        /// <summary>
        /// A float.
        /// </summary>
        Float,
        /// <summary>
        /// A string.
        /// </summary>
        String,
        /// <summary>
        /// A boolean.
        /// </summary>
        Boolean,
        /// <summary>
        /// A null token.
        /// </summary>
        Null,
        /// <summary>
        /// An undefined token.
        /// </summary>
        Undefined,
        /// <summary>
        /// An object end token.
        /// </summary>
        EndObject,
        /// <summary>
        /// An array end token.
        /// </summary>
        EndArray,
        /// <summary>
        /// A JavaScript object constructor.
        /// </summary>
        Constructor,
        /// <summary>
        /// A Date.
        /// </summary>
        Date
    }

}
